package com.sg.controller.pbff;

import com.sg.service.biz.pbff.TaskGenService;
import com.sg.dto.biz.pbff.req.*;
import com.sg.dto.biz.pbff.res.*;
import com.sg.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Api(value = "TaskGen", tags = {"TaskGen"})
@RestController
// @RequestMapping("/poms/taskGen/")
public class TaskGenController {
    @Autowired
    TaskGenService taskGenService;

    /**
     * B3-2查询定时任务调度列表(管理)(平台)
     * gen by moon at 11/22/2022, 8:49:57 PM
     */
    @PostMapping("/oms/platform/mgt/taskGen/queryTimerTaskPlanList")
    @ApiOperation(value = "B3-2查询定时任务调度列表(管理)(平台)", response = OkrResult.class)
    public OkrResult<BffQueryTimerTaskPlanListRespDto> queryTimerTaskPlanList(@RequestBody(required = false) @Validated BffQueryTimerTaskPlanListReqDto reqDTO) {
        return OkrResult.success(taskGenService.queryTimerTaskPlanList(reqDTO));
    }

    /**
     * B3-2查询定时任务调度详情(管理)(平台)
     * gen by moon at 11/18/2022, 7:34:54 PM
     */
    @PostMapping("/oms/platform/mgt/taskGen/queryTimerTaskPlanDetail")
    @ApiOperation(value = "B3-2查询定时任务调度详情(管理)(平台)", response = OkrResult.class)
    public OkrResult<BffQueryTimerTaskPlanDetailRespDto> queryTimerTaskPlanDetail(@RequestBody(required = false) @Validated BffQueryTimerTaskPlanDetailReqDto reqDTO) {
        return OkrResult.success(taskGenService.queryTimerTaskPlanDetail(reqDTO));
    }

}

